package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkEmployeeEducation;
import com.ysd.lis.entity.WkEmployeeSpecialty;
import com.ysd.lis.service.WkEmployeeSpecialtyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工档案-专业表 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-02-23
 */
@RestController
@RequestMapping("/wk/employeeSpecialty")
public class WkEmployeeSpecialtyController extends BaseController {

    @Autowired
    WkEmployeeSpecialtyService wkEmployeeSpecialtyService;

    @GetMapping("/getWkEmployeeSpecialtyList/{wkEmployeeId}")
    public Result getWkEmployeeSpecialtyList(@PathVariable("wkEmployeeId") String wkEmployeeId) {
        return wkEmployeeSpecialtyService.getWkEmployeeSpecialtyList(wkEmployeeId);
    }

    @PostMapping("/addEmployeeSpecialty")
    public Result addEmployeeSpecialty(@RequestBody WkEmployeeSpecialty wkEmployeeSpecialty) {
        return wkEmployeeSpecialtyService.addWkEmployeeSpecialty(wkEmployeeSpecialty);
    }

    @PostMapping("/updateEmployeeSpecialty")
    public Result updateEmployeeSpecialty(@RequestBody WkEmployeeSpecialty wkEmployeeSpecialty) {
        return wkEmployeeSpecialtyService.updateWkEmployeeSpecialty(wkEmployeeSpecialty);
    }

    @PostMapping("/deleteEmployeeSpecialty")
    public Result deleteEmployeeSpecialty(@RequestBody WkEmployeeSpecialty wkEmployeeSpecialty) {
        return wkEmployeeSpecialtyService.deleteWkEmployeeSpecialty(wkEmployeeSpecialty);
    }

}
